<?php

		$catid = $_GET['catid'];
		$textlengh = 150;
		$sql_query = "SELECT * FROM tbl_product WHERE pro_cat = '$catid'";
		$result = mysql_query("$sql_query");
		$ncat = _GetCatName($catid);
?>
<div class="moduleTitle">
	<h3><span>Các món <?php echo $ncat; ?></span></h3>
</div>
<div class="jbmoduleBody">
	<div>
		<div class="zentools grid  zenshadow count5 ">
			<ul>	
				<div id="updates">
<?php
		if(mysql_num_rows($result) > 0)
		{
			while($rows=mysql_fetch_assoc($result))
			{
				extract($rows);
			?>
				<li class="product_grid">		
                    <div class="product_item image">
                        <div id="<?php echo $id; ?>  class="last_product">
                            <div class="column grid_twelve">
                                <div class="zenimage firstitem">
                                    <a href="index.php?mod=product&act=detail&id=<?php echo $id; ?>"><img src="<?php if($pro_img != ""){ echo $pro_img;} else { echo "images/not_available.jpg";} ?>" style="opacity: 1; height: 183px; "></a>
                                </div>
                                <div class="zentitle">
                                    <h2><a href="index.php?mod=product&act=detail&id=<?php echo $id; ?>"><?php echo $pro_name; ?></a></h2>
                                </div>										
                                <div class="zencategory">
								<?php 
								$catname = _GetCatName($pro_cat);
								echo $catname;
								?></div>
                                <div style="height:90px;"><p></p>
                                    <p>
										<?php 
											echo mb_substr(strip_tags($pro_detail), 0, $textlengh, 'UTF-8');
											echo "...";
										?>
                                    </p>
                                </div>
                                <div class="zenmore">
                                    <a href="index.php?mod=product&act=detail&id=<?php echo $id; ?>"><span class="readon">More ...</span></a>
                                </div>
                            </div>
                        </div>
                    </div>
                </li>
<?php
			}
		}
		else
		{
			echo "<p align='center'>This category do not have product yet!</p>";
		}
	

?>
                </div>
				<li class="clear"></li>
 			</ul>
		</div>
	</div>
</div>